/*
*       A simple 2D game map editor
*
*       This library is free software; you can redistribute it and/or
*       modify it under the terms of the GNU Lesser General Public
*       License as published by the Free Software Foundation; either
*       version 2.1 of the License, or (at your option) any later version.
*/
// Name        : map
// File        : map.h
// Description :
// Author      : hoha
// Date        : 01/07/2009
// Evolutions  : 01/07/2009, Version V0, Creation
#ifndef MAP_H
#define MAP_H

#define MAX_MAP_WIDTH 100
#define MAX_MAP_HEIGHT 100
#define NS_TILE_ID_MAP 0xFFFF

typedef struct{
	int tileId_L0;
	int tileId_L1;
	bool is_barrier;
}map_t;

enum{
	MAP_LAYER0=0,
	MAP_LAYER1=1
};
extern int map_layer;
extern map_t gmap[MAX_MAP_WIDTH][MAX_MAP_HEIGHT];

void init_map();
void fill_tile_in_map(int tileId, int mapX, int mapY, int mapLayer);
void erase_tile_in_map(int mapX, int mapY, int mapLayer);
void mark_tile_as_barrier(int mapX, int mapY);
void mark_tile_as_normal(int mapX, int mapY);
#endif //MAP_H
